package com.lanou.controller;

import com.lanou.bean.Refer;
import com.lanou.bean.Staff;
import com.lanou.service.ReferService;
import com.lanou.service.StaffService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by dllo on 18/4/16.
 */
@Controller
public class ReferController {
    @Resource
    private ReferService referService;
    @RequestMapping("/addRefer")
    public String addRefer(){
        return "refer/addRefer";
    }
    @RequestMapping("/selectRefer")
    public List<Refer> selectRefer(Model model){
        List refer = referService.referAll();
        System.out.println(refer);
        model.addAttribute("refer",refer);
       return refer;
    }
}
